<extend name="Public:innerbase" />
<block name="css">
<link rel="stylesheet" href="{:STATICS}/validation/css/validationEngine.jquery.css">
<link type="text/css" rel="stylesheet" href="{:STATICS}/datetimepicker/css/bootstrap-datetimepicker.min.css" />
</block>
<block name="js">
<script type="text/javascript" src="{:STATICS}/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="{:STATICS}/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
<script src="{:STATICS}/spark/spark.util.js"></script>
<script type="text/javascript" src="{:STATICS}/validation/js/jquery.validationEngine.js"></script>
<script type="text/javascript" src="{:STATICS}/validation/js/jquery.validationEngine-zh_CN.js"></script>
<script>
$(function(){
	$("#form").validationEngine("attach",{ 
		promptPosition:"centerRight",
		scroll:true,
		showOneMessage:true
	});
	$(".datetime-picker").datetimepicker({format: 'yyyy-mm-dd',language:'zh-CN',minView:2,autoclose:true});
});
	function find(da) {
		$("input[name='type']").val(da);
	}
	
	function che() {
		var temp=/^(\+|-)?\d+($|\.\d+$)/
		var s = document.getElementById("money");
		if(temp.test(s.value)==false){
			alert("充值金额不正确！");
			return false;
		}
	}

	function check(){
		var pass1= $("input[name='password']").val();
		var repass1= $("input[name='repassword']").val();
		
		if(pass1 != repass1){
			alert("一级密码不一致！");
			return false;
		}
		
	}
</script>
</block>
<block name="content">
<div class="container-fluid">
	<!--<div class="page-header wm-page-header">-->
		<!--<h4 class="left">会员编辑</h4>-->
		<!--<a href="{:U('member/index')}" class="btn btn-sm btn-default">-->
			<!--<span class="glyphicon glyphicon-chevron-left"></span>&nbsp;返回-->
		<!--</a>-->
	<!--</div>-->
	<ul class="nav nav-tabs wm-tabs">
		<li><a href="{:U('Member/index')}">会员管理</a></li>
		<li  class="active"><a href="{:U('Member/adduser')}">添加会员</a></li>
	</ul>
	<form id="form" class="form-horizontal" method="post" style="margin-top:20px;">
		<input type="hidden" name="id" value="{$member.id}" />
		<div class="form-group">
			<label class="control-label col-xs-2">会员电话</label>
			<div class="col-md-4">
				<input type="text" name="phone" class="validate[required] form-control"  value="{$member.phone}" />
			</div>
		</div>
		<div class="form-group">
			<label class="control-label col-xs-2">姓名</label>
			<div class="col-md-4">
				<input type="text" name="username" class="validate[required] form-control" value="{$member.name}" />
			</div>
		</div>
		<div class="form-group">
			<label class="control-label col-xs-2">直推人Id</label>
			<div class="col-md-4">
				<input type="text" name="shareid" class="validate[required] form-control" value="{$member.name}" />
			</div>
		</div>
		<div class="form-group">
			<label class="control-label col-xs-2">密码</label>
			<div class="col-md-4">
				<input type="password" name="password" class="validate[required] form-control"
					   value="{$member.password1}" />
			</div>
		</div>
		<div class="form-group">
			<label class="control-label col-xs-2">重复密码</label>
			<div class="col-md-4">
				<input type="password" name="repassword" class="validate[required] form-control"
					   value="{$member.repassword1}" />
			</div>
		</div>
		
		
		<div class="form-group">
			<div class="col-md-4 col-xs-offset-2">
				<button type="submit" onclick="return check()" class="btn btn-success">保存</button>
			</div>

		</div>
	</form>
</div>
</block>